import javax.jms.MapMessage;
import javax.jms.Message;
import javax.jms.MessageListener;

import org.springframework.stereotype.Service;

import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;

import cn.itcast.bos.utils.SmsUtils;

@Service("workBillNotice")
public class WorkBillNotice implements MessageListener {

	@Override
	public void onMessage(Message message) {
		
		//将消息强转成map类型
		MapMessage mapMessage=(MapMessage) message;
		
		/*//调用阿里大于发送短信
		SendSmsResponse response;
		try {
			response = SmsUtils.sendSms(mapMessage.getString("telephone"),
					mapMessage.getString("msg"));
		
		
			if (response.getCode() != null && response.getCode().equals("ok")) {
				  System.out.println("短信发送成功");
				 
				 } else {
				  
				 System.out.println("短信发送失败"); }
		
		} catch (Exception e) {
			
			e.printStackTrace();
		}
*/
				
					
		
		
		
		
		
	}

}
